<template>
	<!-- 资产页面 -->
	<view class="asset">
		<view class="user-info">
			<view class="user-info-bd" style="margin-top: 7%;">
				
					<image src="../../../static/public/img/fh.png" style="width: 20px;height: 20px;border-radius:55px" @click="black()">
					</image>
				
				<view style="width: 100%;text-align: center;font-size: 18px;font-weight: 600;color: #333;margin-left: -5%;">今日盈亏</view>
			</view>
		
		</view>
		
		<view class="property-info"> 
			<view class="wealth" style="color: #999;">投资</view>
			<view style="text-align: center;font-size: 25px;color:#f8d49e;margin-top:15px;border-bottom: 0.013333rem dashed #f8d49e;width: 90%;margin-left: 5%;"></view>

			<view @click="gopay" style="width:40%;height: 45px;background: linear-gradient(180deg,#625138,#463c2f);color:#f8d49e;font-size: 11px;line-height: 45px;margin-left: 5%;text-align: center;border-radius: 10px;float:left;margin-top: 5%;">
				<text>盈利：{{data.prize}}</text>
			</view>
		
			<view style="width:40%;height: 45px;background: linear-gradient(180deg,#625138,#463c2f);color:#f8d49e;font-size: 11px;line-height: 45px;margin-left: 10%;text-align: center;border-radius: 10px;float:left;margin-top: 5%;">
				<text>余额：{{data.money}}</text>
			</view>
		</view>
		
		
		<view class="property-info" style="color: #b29a7b;font-size: 12px;">
			<view style="width:33%;text-align: center;margin-top: 3%;float: left;border-bottom: 1px solid #242425;padding-bottom: 3%;border-right: 1px solid #242425;">
				<view>{{data.tou}}</view>
				<view style="margin-top:4%;">投资金额</view>
			</view>
			<view style="width:33%;text-align: center;margin-top: 3%;float: left;border-bottom: 1px solid #242425;padding-bottom: 3%;border-right: 1px solid #242425;">
				<view>{{data.prize}}</view>
				<view style="margin-top:4%;">获利金额</view>
			</view>
			<view style="width:33%;text-align: center;margin-top: 3%;float: left;border-bottom: 1px solid #242425;padding-bottom: 3%;">
				<view>{{data.cz}}</view>
				<view style="margin-top:4%;">存款金额</view>
			</view>
			<view style="width:33%;text-align: center;margin-top: 3%;float: left;">
				<view>{{data.tou}}</view>
				<view style="margin-top:4%;">取款金额</view>
			</view>
			
		</view>

	
		
	
		


		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data:[]
			}
		},

		methods: {
           black(){
			   uni.navigateBack();
		   },
		   home(){
			   this.$api.request('/api/todayWin').then((res)=>{
				   this.data  = res.data
			   })
		   }
		},
		onShow() {

		},
		onLoad() {
			this.home()
		}

	}
</script>

<style lang="scss">
	page {
		background-color: #121213;
	}

	.asset {
		.user-info {
			position: relative;
			overflow: hidden;
			z-index: 1;
			top: 0;
			background-image: linear-gradient(90deg,#f7ce94,#d49b54);
			border-radius: 0 0 40px 40px;
			height: 135px;
			padding-top: 15px;
		}

		.user-info-hd {
			position: absolute;
			top: 22px;
			right: 15px;
			overflow: hidden;
		}

		.user-info-bd {
			display: -webkit-box;
			display: -webkit-flex;
			display: flex;
			-webkit-box-align: center;
			-webkit-align-items: center;
			align-items: center;
			padding: 1px 17px 0px;
		}

		.property-info {
			position: relative;
			overflow: hidden;
			margin: 0px 15px 10px;
			border-radius: 10px;
			background: #1a1a1c;
			line-height: 1;
			padding-bottom: 30px;
			padding-top: 2%;
			z-index:999;
			top: -55px;
		}

		.user-info-bd .avatar {
			float: left;
			width: 60px;
			height: 60px;
			margin-bottom: 13px;
			margin-right: 15px;
		}

		.property-info .wealth {
			margin-top: 0.533333rem;
			color: #fff;
			text-align: center;
			font-size: 12px;
		}

		.group {
			margin: -14% 15px 10px;
			background: #1a1a1c;
			border-radius: 0.266667rem;
			overflow: hidden;
		}

		.grid {
			display: -webkit-box;
			display: -webkit-flex;
			display: flex;
		}

		.grid {
			-webkit-justify-content: space-around;
			justify-content: space-around;
			text-align: center;
			padding-top: 4%;
			padding-bottom: 5%;
		}

		.grid-item {
			-webkit-box-flex: 1;
			-webkit-flex: 1;
			flex: 1;
			display: block;
			padding: 0.16rem 0;
			background-clip: content-box;
			font-size: 13px;

		}

		.group-title {
			margin: 0 20px;
			height: 35px;
			line-height: 35px;
			border-bottom: 1px solid #313133;
			font-weight: 400;
			color: #dca662;
			font-size: 12px;
		}
		


	}
</style>
